// 全局的getters
// 简化获取模块状态的代码
const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  staffPhoto: state => state.user.userInfo.staffPhoto, // 建立用户头像的映射
  userInfo: state => state.user.userInfo, // 建立用户头像的映射
  routes: state => state.permission.routes, // 导出当前的路由
  name: function(state) {
    return state.user.userInfo.username
  }
/*   token:(state) =>{
    return state.user.token
  } */
  // avatar: state => state.user.avatar,
  // name: state => state.user.name
}
export default getters
